import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login'
import layout from '@/views/layout'
import home from '@/views/home'
import Warehouse from '@/views/base/Warehouse'
import Library from '@/views/base/Library'
import Addware from '@/components/Addware'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',

    component: Login
  },
  {
    path: '/layout',

    component: layout,
    children: [
      {
        path: '/home',

        component: home
      },
      {
        path: '/Warehouse',

        component: Warehouse
      },
      {
        path: '/Library',

        component: Library
      },
      {
        path: '/Addware',

        component: Addware
      }

    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
